<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="受保护的虚拟机名称存在特殊字符导致备份失败">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="vmware_gud_0115.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="">
<meta name="DC.Publisher" content="20250306">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="vmware_gud_0128">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>受保护的虚拟机名称存在特殊字符导致备份失败</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="vmware_gud_0128"></a><a name="vmware_gud_0128"></a>

<h1 class="topictitle1">受保护的虚拟机名称存在特殊字符导致备份失败</h1>
<div><div class="section"><h4 class="sectiontitle">现象描述</h4><p>备份VMware虚拟机时，备份传输模式为SAN传输模式，VMware备份任务失败，提示无法获取虚拟机备份进度。</p>
</div>
<div class="section"><h4 class="sectiontitle">可能原因</h4><p>受保护的虚拟机名称或磁盘名称中包含特殊字符@。</p>
</div>
<div class="section"><h4 class="sectiontitle">处理步骤</h4><ol><li><span>检查虚拟机名称或虚拟磁盘名称中是否包含特殊字符@。</span><p><ol type="a"><li>使用客户端或浏览器，登录ESXi主机或vCenter Server。</li><li>检查Datastore上对应虚拟机的vmdk文件及父文件夹名称中是否包含@字符。<ul><li>是，执行<a href="#vmware_gud_0128__li19710311824">2</a>修改虚拟机名称。</li><li>否，联系技术支持工程师处理。</li></ul>
</li></ol>
</p></li><li id="vmware_gud_0128__li19710311824"><a name="vmware_gud_0128__li19710311824"></a><a name="li19710311824"></a><span>关闭虚拟机。</span><p><p>本节以旧虚拟机名称为yms123@，修改后的名称为yms1234为例说明。</p>
</p></li><li><span>使用PuTTY，登录虚拟机所在的ESXi主机。</span></li><li><span>执行以下命令进入虚拟机所在目录。</span><p><pre class="screen">cd /vmfs/volumes/<em>Datastore名称</em>/<em>原虚拟机名称</em></pre>
</p></li><li><span>执行以下命令重命名vmdk文件（虚拟磁盘文件，仅包括<em>原名称</em>.vmdk以及<em>原名称_</em><em>n</em>.vmdk）。</span><p><pre class="screen">vmkfstools -E "<em>原名称</em>.vmdk" "<em>新名称</em>.vmdk"</pre>
<div class="p">如执行以下命令重命名vmdk文件：<pre class="screen"> vmkfstools -E "yms123@.vmdk" "yms1234.vmdk"</pre>
<pre class="screen"> vmkfstools -E "yms123@_1.vmdk" "yms1234_1.vmdk"</pre>
</div>
</p></li><li id="vmware_gud_0128__li19322040237"><a name="vmware_gud_0128__li19322040237"></a><a name="li19322040237"></a><span>执行以下命令复制虚拟机配置文件。</span><p><pre class="screen">cp "<em>原名称</em>.vmx" "<em>新名称</em>.vmx"</pre>
<div class="p">如执行以下命令复制配置文件：<pre class="screen">cp "yms123@.vmx" "yms1234.vmx"</pre>
</div>
</p></li><li><span>打开新的虚拟机配置文件，将其中所有旧名称修改为新名称。</span><p><div class="note"><img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span><div class="notebody"><p>如需回退修改，可以从<a href="#vmware_gud_0128__li19322040237">6</a>中获取原配置文件“<em>原名称</em>.vmx”中的内容。</p>
</div></div>
</p></li><li><span>执行以下命令将其他所有文件重命名为新名称。</span><p><pre class="screen">mv "<em>原名称</em>.<em>nvram</em>" "<em>新名称</em>.<em>nvram</em>"</pre>
<div class="p">如执行以下命令：<pre class="screen">mv "yms123@.nvram" "yms1234.nvram"</pre>
</div>
<pre class="screen">mv "yms123@_1-ctk.vmdk" "yms1234_1-ctk.vmdk"</pre>
</p></li><li><span>执行以下命令重命名虚拟机目录名称。</span><p><pre class="screen">cd ..</pre>
<pre class="screen">mv "<em>原名称</em>" "<em>新名称</em>"</pre>
</p></li><li><span>执行以下命令删除虚拟机的旧配置文件。</span><p><pre class="screen">rm /vmfs/volumes/<em>Datastore名称</em>/<em>新名称</em>/<em>旧名称</em>.vmx</pre>
</p></li><li><span>执行以下命令注册新虚拟机至ESXi主机。</span><p><pre class="screen">vim-cmd solo/registervm /vmfs/volumes/<em>Datastore名称</em>/<em>新名称</em>/<em>新名称</em>.vmx</pre>
</p></li><li><span>启动新虚拟机。</span><p><ol type="a"><li>使用客户端或浏览器，登录ESXi主机或vCenter Server。</li><li>启动新虚拟机。<p>启动新虚拟机时，根据提示选择虚拟机已被移动。</p>
</li><li>如果旧虚拟机仍存在，请将其删除。</li></ol>
</p></li><li><span>重新扫描VMware虚拟化环境，将修改名称后的虚拟机注册至<span>OceanProtect</span>。</span><p><ol type="a"><li>选择<span class="uicontrol" id="vmware_gud_0128__zh-cn_topic_0000002199964685_uicontrol1738217261378">“<span id="vmware_gud_0128__zh-cn_topic_0000002199964685_text738292620372">保护</span> &gt; 虚拟化 &gt; VMware”</span>。</li><li>在VMware页面左侧选中需要执行操作的vCenter Server或ESXi。</li><li>单击<span class="uicontrol">“<span>更多</span> &gt; <span>资源扫描</span>”</span>。</li></ol>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="vmware_gud_0115.html">常见问题</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>